package top.minuy.structure.graph.cycle.dfs;

import top.minuy.res.graph.GraphRes;
import top.minuy.structure.graph.representations.table.Graph;

/**
 * 环检测测试，深度优先遍历
 *
 * @author Minuy
 * @time 22:01
 * @date 2021/11/18
 */
public class Test {
    public static void main(String[] args) {
        Graph graph = new Graph(GraphRes.G_CYCLE_1);
        CycleDetection cd1 = new CycleDetection(graph);
        System.out.println(cd1);
        System.out.println(graph);


        Graph graph2 = new Graph(GraphRes.G_CYCLE_2);
        CycleDetection cd2 = new CycleDetection(graph2);
        System.out.println(cd2);
        System.out.println(graph2);
    }
}
